Skip to content

Add close keymaps to commit log panel#482

Draft
kevintraver wants to merge 2 commits intosindrets:mainfrom
kevintraver:feature/close-keymaps-for-commit-log-panel
Draft

Add close keymaps to commit log panel#482
kevintraver wants to merge 2 commits intosindrets:mainfrom
kevintraver:feature/close-keymaps-for-commit-log-panel

Conversation

@kevintraver
Copy link

Work in progress for #481

@kevintraver kevintraver force-pushed the feature/close-keymaps-for-commit-log-panel branch from 32e7f98 to d2659c4 Compare April 4, 2024 18:01
@pksunkara
Copy link

What's needed to get this done? I can make a PR if needed.

@emmanueltouzery
Copy link
Contributor

i think the author addressed that in #167 (comment)

dlyongemallo pushed a commit to dlyongemallo/diffview.nvim that referenced this pull request Feb 4, 2026
Add q and <esc> keymaps to close the commit log panel, matching the
behaviour of other panels like the help panel. The keymaps are
configurable via keymaps.commit_log_panel.

Fixes sindrets#481

for _, mapping in ipairs(conf.commit_log_panel) do
local map_opt = vim.tbl_extend("force", default_opt, mapping[4] or {}, { buffer = self.bufid })
vim.keymap.set(mapping[1], mapping[2], mapping[3], map_opt)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is incorrect. It sets a global keymap which means pressing Escape will now close any diffview window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants